
<#import "_master.ftl" as layout />

<@layout.masterTemplate
title="Tecnico ${tecnico}" selected="Tecnici">


<section id="model">
	<ul class="breadcrumb">
		<li><a href="/Tecnici">Tecnici</a> <span class="divider">/</span></li>
		<li class="active">${tecnico}</li>
	</ul>
	<div class="page-header">
		<h1>
			${tecnico} <small>Tecnico</small>
		</h1>
	</div>
	<form class="bs-docs form-horizontal">
		<div class="control-group">
			<label class="control-label">Nome</label>
			<div class="controls">
				<input type="text" value="${tecnico.nome}" disabled="disabled" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Cognome</label>
			<div class="controls">
				<input type="text" value="${tecnico.cognome}"  disabled="disabled" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Data di nascita</label>
			<div class="controls">
				<input type="text" value="${tecnico.dataNascita?date?string.long}" disabled="disabled" />
			</div>
		</div>
	</form>
	<h2>Interventi</h2>
	<table class="table table-striped" id="list">
		<#if (tecnico.interventi?size > 0)>
		<thead>
			<tr>
				<th>#</th>
				<th>Data</th>
				<th>Descrizione</th>
				<th>Ascensore</th>
			</tr>
		</thead>
		<tbody>
			<#list tecnico.interventi as intervento>
			<tr>
				<td>${intervento.id?string.computer}</td>
				<td>${intervento.data?date?string.long}</td>
				<td>${intervento.descrizione}</td>
				<td>${intervento.ascensore.modello}</td>
			</tr>
			</#list>
		</tbody>
		<#else>
		<tbody>
			<tr>
				<td colspan="4">Nessun intervento trovato</td>
			</tr>
		</tbody>
		</#if>
	</table>
</section>



</@layout.masterTemplate>